package com.dashu.controller;

import com.dashu.config.CustomConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by cuip on 2016/12/31.
 */
@RestController
@RequestMapping(value = "config")
public class CustomConfigController {

    @Autowired
    private CustomConfig customConfig;

    @GetMapping(value = "index")
    public String index(){
        return "webName: "+customConfig.getName()+", webVersion: "+customConfig.getVersion()+
                ", webAuth: "+customConfig.getAuth()+", webTitle: "+customConfig.getTitle();
    }
}
